<!DOCTYPE html>
<head >
	<meta charset="utf-8"/>
	<title>编辑字典</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
	<link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css"  media="all"/>
	<link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"/>
	<link rel="stylesheet"  href="../../../css/common/loader.css" media="all"/>
	<link rel="stylesheet"  href="../../../css/common/tablepage.css" media="all"/>
	<link rel="stylesheet"  href="../../../css/common/openshow.css" media="all"/>
</head>
<body>
<form class="layui-form layui-form-pane label-w6" action="" id="saveForm" lay-filter="saveForm">
 <input type="hidden" name="dictKey"  />
<input type="hidden" name="dictIndexId"   />
<input type="hidden" name="dictId"  />
<input type="hidden" name="oldDictCode" id="oldDictCode"  />
  <div class="layui-form-item">
    <label class="layui-form-label">字典标识 </label>
    <div class="layui-input-block">
      <input type="text" name="dictKey"  disabled autocomplete="off"  class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">字典名称 </label>
    <div class=layui-input-block>
      <input type="text" name="dictName"  disabled  autocomplete="off" class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">字典对照码  <span class="layui-red-star">*</span></label>
    <div class=layui-input-block>
      <input type="text" name="dictCode"  lay-verify="required|max:100"  autocomplete="off" class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">字典对照值  <span class="layui-red-star">*</span></label>
    <div class=layui-input-block>
      <input type="text" name="dictValue"  lay-verify="required|max:100"  autocomplete="off" class="layui-input">
    </div>
  </div>
   <div class="layui-form-item">
    <label class="layui-form-label">当前状态</label>
    <div class="layui-input-block">
      <select name="status" lay-select-code="status" lay-select-dict="status" lay-select-title="NONE" >
      </select>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">编辑模式</label>
    <div class="layui-input-block">
      <select name="editMode"   lay-select-code="editMode" lay-select-dict="edit_mode" lay-select-title="NONE" >
     
      </select>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">排序号  <span class="layui-red-star">*</span></label>
    <div class=layui-input-block>
      <input type="number" name="sortNo"   lay-verify="required"  autocomplete="off" class="layui-input">
    </div>
  </div>
  <!-- 隐藏域 -->
   <div class="layui-form-item" style="display:none;">
    <button class="layui-btn" lay-submit="" lay-filter="saveSubmit">提交</button>
  </div>
</form>
  <script   src="../../../layuiadmin/layui/layui.js"></script>
<script type="text/javascript" src="../../../lib/jQuery-2.2.0.min.js" ></script>
	<script>
	layui.config({
		base :  '../../../layuiadmin/' //静态资源所在路径
	}).extend({
		webplus : 'lib/webplus', //主入口模块
	}).use([ 'form','webplus' ], function() {
	    var webplus=layui.webplus;
		webplus.initForm('system/dict/updateDict','','',function(data){
		 webplus.reloadTable('1','submitDict'); //刷新父页面的table
    		
		},function(){
			webplus.doAjax('system/dict/editDict',{id:webplus.getUrlType().id},'','0','',function(res){
				if(webplus.isEmpty(res.data)) return false;
				// 处理后的数据赋值
				$("#oldDictCode").val(res.data.dictCode);
				webplus.setFormData("saveForm",res.data);
			})
		
		});
		
	});

	</script>
</body>
</html>